import React from 'react'
import { makeThrower, fetchMessage } from './utils'

export default function Message ({ getMessage, next }: { getMessage: any; next: any}) {
  const data = getMessage();
  return (
    <>
      <p className="message">{data.message}</p>
      <button onClick={next}>Next</button>
    </>
  );
}